<template>
    <el-menu default-active="2" class="el-menu-vertical-demo" background-color="#001529" text-color="#fff" style="height: 100%;"
    
    router>
      <NavItem v-for="(v,i) in items" :key="i" :item="v" :path="v.url"/>   
    </el-menu>
</template>
<script>
import NavItem from './NavItem.vue';
export default{
  data(){
    return{
      items:[
      {
              "checked":true,
              "child":[

              ],
              "id":2,
              "name":"首页",
              "pid":0,
              "url":"/index",
              "icon":"el-icon-s-custom"
          },
          {
              "checked":true,
              "child":[
                  {
                      "checked":true,
                      "child":[

                      ],
                      "id":3,
                      "name":"用户管理",
                      "pid":1,
                      "url":"/user/list",
                      "icon":"el-icon-user-solid"
                  },
                  {
                      "checked":true,
                      "child":[

                      ],
                      "id":3,
                      "name":"角色管理",
                      "pid":1,
                      "url":"/role/list",
                      "icon":"el-icon-s-custom"
                  },
                  {
                      "checked":true,
                      "child":[

                      ],
                      "id":3,
                      "name":"菜单管理",
                      "pid":1,
                      "url":"/menu/list",
                      "icon":"el-icon-menu"
                  }
              ],
              "id":1,
              "name":"权限管理",
              "pid":0,
              "url":""
          }
    
      ]
    }
  },
  components:{
    NavItem
  },
  methods:{

  }
}

</script>

<style>


</style>
